Block network test #14
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request includes changes to the
ha_db_hanarole and its associated tests, focusing on improving the test infrastructure and modifying task names for clarity. The most important changes include adding a new test class for the HANA DB block network, modifying task names in the playbook, and creating mock data scripts for testing purposes.Test Infrastructure Improvements:
tests/roles/ha_db_hana/block_network_test.py: Added a new test classTestBlockNetworkTestto validate the HANA DB block network between primary and secondary nodes. This class sets up a temporary test environment, mocks necessary Python modules and commands, and verifies the execution of the tasks.Playbook Modifications:
src/roles/ha_db_hana/tasks/block-network.yml: Modified the task name from "Test Execution: Validate HANA DB cluster status" to "Test Execution: Validate HANA DB cluster status 2" for better clarity. [1] [2]Mock Data Scripts:
tests/roles/mock_data/ping.txt: Added a new mock script for thepingcommand to simulate connection failures in a controlled manner.tests/roles/mock_data/sleep.txt: Added a new mock script for thesleepcommand to simulate its execution in tests.# DescriptionTesting
Test Environment